All Questions
11 questions
3votes
1answer
1kviews
How can I send stdout to multiple commands in fish shell?
Same question as How can I send stdout to multiple commands? but for fish shell.
1vote
4answers
184views
What exactly is happening when a pipe is followed by a command grouping?
I saw an expression like command1 | {command2;command3;command4} and I was thinking what this actually means, I know the pipe symbol, I know that {...} forces to run the commands inside the curly ...
5votes
2answers
1kviews
pipeline as find's -exec argument
Is it possible to use a pipeline command as an argument to find's -exec option? This means, I want to do something like this: find . -name CMakeLists* -exec cat '{}' | grep lib \; where I am trying ...
4votes
1answer
8kviews
cat into stdin then pipe into program keeps forked shell open, why?
I'm not sure what's going on but I've been trying to understand what is happening with the input and output. So here is my program. #include <stdio.h> #include <stdlib.h> int main(){ ...
5votes
1answer
2kviews
Logging bash output to a file
I'm trying to build vlc, which is rather complicated and dependent on having the right packages installed, and keeps choking on errors. To trace all my steps, I wish to output what I'm doing to a ...
1vote
1answer
1kviews
Feeding audio from microphone live into python
Well, so I was reading about this raspberry pi tutorial that makes you play audio files from raspberry pi and stream them into a FM signal and something got me curious. You can stream .wav files, ...
20votes
4answers
3kviews
How can I implement a circular flow of data among interconnected commands?
I know of two types how commands can be connected with each other: by using a Pipe (putting std-output into std-input of the next command). by using a Tee (splice the output into many outputs). ...
1vote
3answers
697views
pipe in shell with redirection
My understanding is that a pipe in shell like a | b redirects b's stdin to a's stdout. However, I tried ls | less < somefile, the behavior is very strange. less shows the output of ls concatenated ...
31votes
3answers
26kviews
How can I redirect `time` output and command output to the same pipe?
Suppose I have a binary called foo. If I want to redirect the output of foo to some other process bar, I could write ./foo | bar. On the other hand, if I wanted to time foo, and redirect the output ...
11votes
4answers
4kviews
Preserving color output with cut
Using bash interactively I am trying to use cut to prevent the lines from going longer than my terminal width. But when using a command with colorized output all the color gets removed by cut. For ...
2votes
1answer
1kviews
Make stdout and stderr be buffered by the same buffer
Is it possible to force glibc to use the same buffer for stdout and stderr? If I tee the both outputs: ./tests/tests 2>&1 | tee log I get mixed messages (i.e. messages are ordered inside ...